package com.mt.customer.feign;

import java.util.List;
import java.util.Map;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import com.mt.common.PagerInfo;
import com.mt.common.ServiceResult;
import com.mt.customer.entity.CustomerEntity;

@FeignClient(name = "customerService")
public interface CustomerFeign {

    @GetMapping("/customer/findInfo")
    ServiceResult<CustomerEntity> findInfo(@RequestParam Map<String, Object> params);

    @GetMapping("/customer/findList/{page}/{size}")
    ServiceResult<List<CustomerEntity>> findList(@RequestParam Map<String, Object> params,
            @PathVariable(value = "page") Integer page, @PathVariable(value = "size") Integer size);

    @PostMapping("/customer/doInsert")
    ServiceResult<Integer> doInsert(@RequestBody CustomerEntity customerEntity);

    @PostMapping("/customer/doUpdate")
    ServiceResult<Integer> doUpdate(@RequestBody CustomerEntity customerEntity);

}
